.container {
  display: flex;
  width: 800px;

  .user-list {
    width: 250px;
    background: rgb(230, 230, 230);

    // 搜索框
    .wrapper {
      padding: 22px 12px 12px 12px;
      .search-wrapper {
        position: relative;
        display: flex;
        box-sizing: border-box;
        height: 26px;
        width: 100%;
        background-color: #e5e3e2;
        border: 1px solid #d9d7d6;
        border-radius: 2px;
        .searchInput {
          flex: 1;
          font-size: 12px;
          padding: 6px;
          background-color: #e5e3e2;
          outline: none;
          &:focus {
            background-color: #f2efee;
          }
        }
        .icon-search {
          display: inline-block;
          width: 24px;
          height: 24px;
          font-size: 14px;
          line-height: 24px;
          text-align: center;
        }
        .searchInput-delete {
          display: block;
          position: absolute;
          outline: none;
          top: 0;
          right: 0;
          width: 24px;
          height: 100%;
          background-image: url(../images/delete.png);
          background-size: 26px;
          background-position: center;
          background-repeat: no-repeat;
          cursor: pointer;
        }
      }
    }

    // 聊天用户列表
    .msg-list {
      height: 540px;
      overflow-y: auto;
      .session-list {
        display: flex;
        padding: 12px;
        transition: background-color 0.1s;
        font-size: 0;
        &:hover {
          background-color: rgb(220, 220, 220);
        }
        &.active {
          background-color: #c4c4c4;
        }
        .avatar {
          border-radius: 5px;
          margin-right: 12px;
        }
        .list-right {
          position: relative;
          flex: 1;
          margin-top: 4px;
          .name {
            display: inline-block;
            vertical-align: top;
            font-size: 14px;
          }
          .time {
            float: right;
            color: #999;
            font-size: 10px;
            vertical-align: top;
          }
          .last-msg {
            position: absolute;
            font-size: 12px;
            width: 130px;
            height: 15px;
            line-height: 15px;
            color: #999;
            bottom: 4px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
          }
        }
      }
    }
  }

  .chat-list {
    flex: 1;
    // 聊天区域
    .message {
      width: 100%;
      height: 450px;
      .header {
        height: 60px;
        padding: 28px 0 0 30px;
        box-sizing: border-box;
        border-bottom: 1px solid #e7e7e7;
        .friendname {
          font-size: 18px;
        }
      }
      .message-wrapper {
        min-height: 390px;
        max-height: 390px;
        padding: 10px 15px;
        box-sizing: border-box;
        overflow-y: auto;
        border-bottom: 1px solid #e7e7e7;
        .message-item {
          margin-top: 10px;
        }
        .message {
          margin-bottom: 15px;
        }
        .time {
          width: 100%;
          font-size: 12px;
          margin: 7px auto;
          text-align: center;
          span {
            display: inline-block;
            padding: 4px 6px;
            color: #fff;
            border-radius: 3px;
            background-color: #dcdcdc;
          }
        }
        .message-main {
          .avatar {
            float: left;
            margin-left: 15px;
            border-radius: 3px;
          }
          .content {
            display: inline-block;
            margin-left: 10px;
            position: relative;
            padding: 6px 10px;
            max-width: 330px;
            min-height: 36px;
            line-height: 24px;
            box-sizing: border-box;
            font-size: 14px;
            text-align: left;
            word-break: break-all;
            background-color: #fafafa;
            border-radius: 4px;
            &:before {
              content: " ";
              position: absolute;
              top: 12px;
              right: 100%;
              border: 6px solid transparent;
              border-right-color: #fafafa;
            }
          }
        }
        .self {
          text-align: right;
          .avatar {
            float: right;
            margin: 0 15px;
          }
          .content {
            background-color: #b2e281;
            &:before {
              right: -12px;
              vertical-align: middle;
              border-right-color: transparent;
              border-left-color: #b2e281;
            }
          }
        }
      }
    }
    // 发送消息区域
    .send-text {
      position: relative;
      height: 150px;
      background: #fff;
      .emoji {
        position: relative;
        width: 100%;
        height: 40px;
        line-height: 40px;
        font-size: 12px;
        padding: 0 30px;
        box-sizing: border-box;
        color: #7c7c7c;

        .icon-look {
          cursor: pointer;
          &:hover {
            color: #1aad19;
          }
        }

        .emojiBox {
          position: absolute;
          display: flex;
          flex-wrap: wrap;
          top: -210px;
          left: -100px;
          width: 300px;
          height: 200px;
          padding: 5px;
          background-color: #fff;
          border: 1px solid #d1d1d1;
          border-radius: 2px;
          box-shadow: 0 1px 2px 1px #d1d1d1;
          &.showbox-enter-active,
          &.showbox-leave-active {
            transition: all 0.5s;
          }
          &.showbox-enter,
          &.showbox-leave-active {
            opacity: 0;
          }
        }
      }
      textarea {
        box-sizing: border-box;
        padding: 0 30px;
        height: 110px;
        width: 100%;
        border: none;
        outline: none;
        font-family: "Micrsofot Yahei";
        resize: none;
      }
      .send {
        position: absolute;
        bottom: 10px;
        right: 30px;
        width: 90px;
        height: 28px;
        line-height: 28px;
        box-sizing: border-box;
        text-align: center;
        border: 1px solid #e5e5e5;
        border-radius: 3px;
        background: #f5f5f5;
        font-size: 14px;
        color: #7c7c7c;
        &:hover {
          background: rgb(18, 150, 17);
          color: #fff;
        }
      }
      .warn {
        position: absolute;
        bottom: 50px;
        right: 10px;
        width: 110px;
        height: 30px;
        line-height: 30px;
        font-size: 12px;
        text-align: center;
        border: 1px solid #bdbdbd;
        border-radius: 4px;
        box-shadow: 0 1px 5px 1px #bdbdbd;
        &.appear-enter-active,
        &.appear-leave-active {
          transition: all 1s;
        }
        &.appear-enter,
        &.appear-leave-active {
          opacity: 0;
        }
        &:before {
          content: " ";
          position: absolute;
          top: 100%;
          right: 20px;
          border: 7px solid transparent;
          border-top-color: #fff;
          filter: drop-shadow(1px 3px 2px #bdbdbd);
        }
      }
    }
  }
}
